<html>
<head>
    <meta charset="utf-8"/>
    <script src="wasm_exec.js"></script>
    <script>
        const go = new Go();
        WebAssembly.instantiateStreaming(fetch("coca.wasm"), go.importObject).then((result) => {
            go.run(result.instance);
            console.log(result.instance)

            let code = `
package com.phodal.coca.analysis.identifier.model;

public class DataClass {
    private String date;

    public String getDate() {
        return date;
    }
}

public class Hello {

}
`;
            compileCode(code, (err, message) => {
                if (err) {
                    console.error(err);
                    return;
                }
                console.log(message);
                analysisConcept(message, (err, message) => {
                    if (err) {
                        console.error(err);
                        return;
                    }
                    console.log(message)
                });
            });
            analysisBadsmell(code, (err, message) => {
                if (err) {
                    console.error(err);
                    return;
                }
                console.log(message);
            })
        });
    </script>
</head>
<body></body>
</html>